<?php
class Linea extends AppModel {
	
	public $name = 'Linea';
	
    public $hasAndBelongsToMany = array(
        'Producto' =>
            array(
                'className'              => 'Producto',
                'joinTable'              => 'lineas_productos',
                'foreignKey'             => 'linea_id',
                'associationForeignKey'  => 'producto_id',
            	'dependent' 			 => true,
                'unique'                 => true,
            )
    );
	
	public $validate = array (
        'nombre' => array('rule' => 'notEmpty')
    );
}
